package jp.oesf.rssreader;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class RssSQLiteOpenHelper extends SQLiteOpenHelper {
	public static final String RSS_DATABASE = "RSS_DATABASE";
	public static final String RSS_TABLE = "RSS_TABLE";

	public RssSQLiteOpenHelper(Context context){
		//データベースの作成（無ければ作る、あれば作らない）
		super(context, RSS_DATABASE, null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase database) {
		database.execSQL("CREATE TABLE " + RSS_TABLE + "(_id INTEGER PRIMARY KEY AUTOINCREMENT" +
													",title TEXT not null" +
													", link TEXT " + ", description TEXT" +
													", pubDate TEXT" + ", guid TEXT" + ", category TEXT" +
													");");
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
	}

}
